package com.tony.pmp.common.utils;

/**
 * Created with IntelliJ IDEA.
 *
 * @Title: TypeConversionUtil
 * @Auther: 皮蛋布丁
 * @Date: 2021/08/08/11:16
 * @Description: 自增类型工具
 */
public class AutoIncrementUtil {

    /**
    * @Description: stringAuto 字符串类型自增
    * @Param: [leftcut 数字左边需要截取掉的长度, needAutoNum 需自增的字符串]
    * @return: java.lang.String
    * @Author: 皮蛋布丁
    * @Date: 2021/8/8 11:24
    */
    public String stringAuto(int leftcut,String needAutoNum) {
        String num = needAutoNum.substring(leftcut);
        int needNum = Integer.valueOf(num).intValue();
        needNum++;
        String result = needAutoNum.substring(0,leftcut) + needNum;
        return result;
    }


}
